﻿@using LunwenYun.Infrastructure.Entities.Entity;
@{
    Layout = "/Views/Shared/_admin.cshtml";
}
<!-- content -->
<div class="container">
    <div class="container">
        <div class="row">
            <div class="span3">
                @Html.Partial("/Views/Shared/Partial/_admin_leftmanu.cshtml")
            </div>
            <div class="span9">
                <blockquote>
                    <p>
                        <strong>行业投稿客服</strong></p>
                </blockquote>
                <hr />
                <form method="post" id="regform" action="/admin/newindustrycs" class="form-horizontal">
                <div class="control-group">
                    <label class="control-label">
                        账 号</label>
                    <div class="controls">
                        <input type="text" class="span4 {required:true,email:true,remote:{url:'/account/usernameonly',messages:'该用户已存在'}}"
                            id="txtusername" name="UserName" placeholder="请输入您的常用邮箱作为您的登录帐号" />
                        <span class="help-block" style="color: Gray">例：example@gmail.com</span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        昵 称</label>
                    <div class="controls">
                        <input type="text" class="span4 {required:true}" id="txtnickname" name="NickName"
                            placeholder="请输入您的昵称" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        密 码</label>
                    <div class="controls">
                        <input type="password" class="span4 {required:true,minlength:6,maxlength:18}" id="txtpassword"
                            name="Password" placeholder="请输入帐号密码" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        确认密码</label>
                    <div class="controls">
                        <input type="password" class="span4 {required:true,equalTo:'#txtpassword'}" id="txtconfrim"
                            name="Confirm" placeholder="请输入帐号密码" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        类 型</label>
                    <div class="controls">
                        <label class="radio inline">
                            <input type="radio" disabled="disabled" name="Role" value="1" checked="checked" />
                            作 者
                        </label>
                        <label class="radio inline">
                            <input type="radio" disabled="disabled" checked="checked" name="Role" value="2" />
                            约稿人
                        </label>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        所属行业</label>
                    <div class="controls">
                        <input type="text" class="span4 {required:true}" id="txtindustry" name="IndustryName" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        行业代码</label>
                    <div class="controls">
                        <input type="text" class="span4 {required:true}" id="txtIndustryCode" name="IndustryCode" />
                        <span class="help-block" style="color: Gray">如石油与天然气工业：oilandgas</span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        承办机构</label>
                    <div class="controls">
                    <select name="Organization">
                    @{
                        List<Organization> list = ViewBag.Org;
                        if(list != null && list.Any())
                        {
                            foreach(var item in list)
                            {
                             <option value="@item.Id">@item.OrganizationName</option>   
                            }
                        }
                        }
                    </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        客服分类</label>
                    <div class="controls">
                        <input type="text" class="span4 {required:true}" id="txtTitle" name="Title" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        QQ</label>
                    <div class="controls">
                        <input type="text" class="span4 {required:true}" id="txtQQ" name="QQ" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        联系电话</label>
                    <div class="controls">
                        <input type="text" class="span4" id="txtPhone" name="Phone" />
                    </div>
                </div>
                <div class="form-actions">
                  <button type="submit" class="btn btn-primary">提交</button>
                  <a href="/admin/industrycs" class="btn">取消</a>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#regform').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
            $('#likcenter').addClass('active');
            $('#likindustrycs').addClass('active');
        });
    </script>
}
